#include <iostream>
#include <cmath>
using namespace std;

int main()
{
	int a = 0,b = 0;
	cin >> a >> b;
	int time = 0;
	time = time + ceil(1.0 * a / b);
	int time2 = (8 + 24) * 60;
	int cha = time2-(time + 10);
	a = (cha / 60) % 24;
	b = cha % 60;
	printf("%02d:%02d",a,b);
	
	return 0;
} 
